package hn.sigit.logic.general;

import hn.sigit.model.commons.IParcel;
import hn.sigit.model.commons.ISpatialZone;
import hn.sigit.model.hnd.administrative.HND_SpatialRule;
import hn.sigit.model.hnd.cadastre.HND_LandUse;
import hn.sigit.model.hnd.cadastre.HND_Layer;
import hn.sigit.model.ladm.spatialunit.LA_Level;

import java.util.List;

import javax.ejb.Local;

import org.jboss.seam.annotations.remoting.WebRemote;

import com.vividsolutions.jts.geom.Geometry;

public interface GeneralHelperX {

	String getRequestRootPath();

	String getWorkingSRS();

	String getWorkingNamespace();

	String getRasterLayerName();

	String getPrimaryWMSLayer();

	String getRequestRootMapServer();

	String getOpenLayersPath();

	String getOpenLayersImgPath();

	String getOpenLayersThemeDefaultImgPath();

	String getOpenLayersJS();

	String getWmsCapabilitiesUrl111();

	String getWmsUrl();

	String formatNullText(String text);

	String formatEmptyText(Object value);

	boolean isParcelInstance(ISpatialZone spatialZone);

	String formatZoneNameText(ISpatialZone spatialZone);
	
	String formatLevelText(LA_Level level);

	String formatLandUseText(HND_LandUse landUse);

	String getZoneUsefulName(ISpatialZone spatialZone);
	
	String spatialRuleText(HND_SpatialRule sr);
	
	String spatialRuleDetailsText(HND_SpatialRule sr);
	
	//used to execute EL expression methods denoted by "elMethod" and do action
	String executeELMethod(String elMethod, String action);

	//used to retrieve parcel's WKT to render features in OpenLayers
	@WebRemote
	String getParcelWKT(long parcelId);

	List<HND_Layer> getLayerList();

	String drawLayerJS(String mapControlName, HND_Layer layer);

	String drawAllLayersJS(String mapControlName);

	double[] calcZoomEnvelope(List<Geometry> envelopeList);

	<P extends IParcel> String getParcelsGML(List<P> parcelList,
			int neighborLevel);

	String getSpatialZonesGML(List<ISpatialZone> spatialZoneList,
			int neighborLevel);

	ResourceBundleHelper getResBundle();

}